const router = require('koa-router')();
const admin_controller = require('../controllers/controller_admin');
const clickHouse_controller = require('../controllers/controller_clickHouse');

//msyql
router.post('/api/loginInit', admin_controller.loginInit);
router.post('/api/getTaskList', admin_controller.getTaskList);
router.post('/api/saveUser', admin_controller.saveUser);
router.post('/api/getUser', admin_controller.getUser);
router.post('/api/findUse', admin_controller.findUse);

//clickhouse
router.post('/api/getTaskAvg', clickHouse_controller.getTaskAvg)
router.post('/api/getTaskMap', clickHouse_controller.getTaskMap)
router.post('/api/getBar', clickHouse_controller.getBar)
router.post('/api/getLine', clickHouse_controller.getLine)
router.post('/api/changeStatus', clickHouse_controller.changeStatus)

module.exports = router;
